package cn.wolfcode.plus.domain;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.*;

/**
 * Author wyy
 * Date 2021/1/31 11:17
 **/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Employee {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String username;
    private String name;
    private String password;
    private String email;
    private int age;
    private boolean admin;
    @TableField(value = "dept_id")
    private Long deptId;

    @TableField(exist = false)
    private Department dept;

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

}
